package com.shortchainsystem.link.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shortchainsystem.model.base.Result;
import com.shortchainsystem.model.domain.link.DTO.LinkIdsDto;
import com.shortchainsystem.model.domain.link.DTO.StaticDTO;
import com.shortchainsystem.model.domain.link.Link;
import com.shortchainsystem.model.domain.link.DO.LinkDO;
import org.json.JSONException;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;

public interface LinkService extends IService<Link> {
    Result encode(LinkDO linkDO);

    String decode(String shortKey, HttpServletRequest request) throws JSONException, IOException;

    Result batchEncode(LinkDO linkDto);

    Result getInfo(String shortUrl);

    Result edit(LinkDO linkDO);

    Result batchDelete(LinkIdsDto linkIdsDto);

    Result historyShow(StaticDTO staticDTO,String userId);

    Result accessHistory(String shortUrl, String userId);

    Result accessEnvironment(String timeType, String userId);

    Result accessOS(String timeType, String userId);

    Result geographicalDistribution(StaticDTO staticDTO, String userId);
}
